{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "honey-accessory",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'set_endpoint' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-4-d7858f1b1ac7>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mset_endpoint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"api.myquant.cn:9000\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m: name 'set_endpoint' is not defined"
     ]
    }
   ],
   "source": [
    "# 本示例运行于python3.6及以上版本\n",
    "from gmtrade.api import *\n",
    "\n",
    "# token身份认证\n",
    "set_token(\"498dc75ecf07987f3ac6b364c1412e04645c5bef\")\n",
    "\n",
    "# 示例中为掘金官方仿真服务地址；如API接入掘金终端，则填空字符串\n",
    "set_endpoint(\"api.myquant.cn:9000\")\n",
    "\n",
    "# 登录账户，account_id为账户ID，必填；account_alias为账号别名，选填\n",
    "a1 = account(account_id='', account_alias='')\n",
    "# 可login多个账户，如login(a1, a2, a3)\n",
    "login(a1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "sweet-bridge",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
